<section class="header">
  <h1>{{t 'storageClassPage.header'}}</h1>
  <div class="right-buttons">
    <button class="btn btn-sm bg-default mr-10" disabled={{rbac-prevents resource="storageclass" scope="cluster"
      permission="create" }} type="button" {{action "importYaml" }}>
      {{t "nav.containers.importCompose"}}
    </button>
    {{#link-to "authenticated.cluster.storage.classes.new" class="btn bg-primary" disabled=(rbac-prevents resource="storageclass" scope="cluster" permission="create")}}
      {{t 'storageClassPage.addActionLabel'}}
    {{/link-to}}
  </div>


</section>

{{#sortable-table
  tableClassNames="bordered"
  paging=true
  pagingLabel="pagination.storageClass"
  headers=headers
  bulkActions=true
  descending=descending
  body=rows
  sortBy=sortBy
  as |sortable kind obj dt|
}}
  {{#if (eq kind "row")}}
    <tr class="main-row">
      <td class="row-check" valign="middle" style="padding-top: 2px;">
        {{check-box nodeId=obj.id}}
      </td>
      <td data-title="{{dt.state}}">
        {{badge-state model=obj}}
      </td>
      <td data-title="{{dt.name}}">
        <a href="{{href-to "authenticated.cluster.storage.classes.detail" obj.id}}">{{obj.displayName}}</a>
      </td>
      <td data-title="{{dt.provisioner}}">
        {{obj.displayProvisioner}}
      </td>
      <td data-title="{{dt.default}}">
        {{#if obj.isDefault}}<i class="icon icon-star-fill text-warning ml-20" />{{/if}}
      </td>
      <td data-title="{{dt.actions}}" class="actions">
        {{action-menu model=obj}}
      </td>
    </tr>
  {{else if (eq kind "nomatch")}}
    <tr>
      <td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">
        {{t 'storageClassPage.noMatch'}}
      </td>
    </tr>
  {{else if (eq kind "norows")}}
    <tr>
      <td colspan="{{sortable.fullColspan}}" class="text-center text-muted lacsso pt-20 pb-20">
        {{t 'storageClassPage.noData'}}
      </td>
    </tr>
  {{/if}}
{{/sortable-table}}
